<script type="text/javascript">
$(function(){
	$(".leftList ul li").hover(function(){
        $(this).addClass("cur").siblings("li").removeClass("cur");
    },function(){
		$(this).removeClass("cur");	
	});
	
	var lefeHeight=$(".leftList").outerHeight(),rightHeight=$(".rightCon").outerHeight();
	if(lefeHeight>rightHeight){
		$(".leftList,.rightCon").height(lefeHeight);
	}else{
		$(".leftList,.rightCon").height(rightHeight);
	}
})
	function loadTemplet(id){
		loadURLWithTip('/${orgi}/design/custom/chart/templetlist/'+id+'.html' , '#right_templet_pannel' , null  , false);
		$(".leftList ul li").css("background","")
		$("#catagory_li_"+id).css("background","#EEE");	
	}
	function templetSelect(id){
		$("#templet_list_div img").attr("class","templet_nocur");
		$("#templet_"+id).attr("class","templet_cur");
		$("#description_text").html($("#templet_"+id).attr("description"));
	}
	function submitForm(){
		$("#templetid").val($("#templet_list_div img[class='templet_cur']").attr("dataid"));
		$("#modelForm").submit();
	}
</script>
<div class="artCon">
	<div class="bigArt">
	<form class="form-horizontal" id="modelForm" data-target="#design_table" action="/${orgi}/design/custom/exchartype.html" data-toggle="ajax-form"  method="post">
	<input type="hidden" value="${reportid!''}" name="reportid" id="reportid"/>
	<input type="hidden" value="${modelid!''}" name="modelid" id="modelid"/>
	<input type="hidden" value="" name="templetid" id="templetid"/>
        <div class="artMain">
        	<div class="leftList">
            	<h2>图表分类：</h2>
                <ul>
                	<#if catagoryList??>
                		<#list catagoryList as catagory>
                		<li id="catagory_li_${catagory.id!''}" onclick="loadTemplet('${catagory.id!''}')" <#if catagory_index==0>style="background:#eee"</#if>><i style="background: url('${catagory.iconstr!''}') no-repeat scroll center center rgba(0, 0, 0, 0);"></i><a href="#">${catagory.name!''}</a></li>
                		</#list>
                	</#if>
                	
                   
                </ul>
            </div>
            <div id="right_templet_pannel" class="rightCon">
            	<#include "templetlist.html"/>
            </div>
        </div>
        <div class="bottomBg">
			<div class="btnWrap">
				<input type="button" onclick="submitForm()" class="subButtonStyle" value="确认"/>
				<input type="button" onclick="closeR3ArtDialog()" class="cancelButtonStyle" value="取消"/>
			</div>
		</div>
		</form>
    </div>
</div>
